|
The Java Module System specifies a distribution format for collections of Java code and associated resources. It also specifies a repository for storing these collections, or ''modules'', and identifies how they can be discovered, loaded and checked for integrity. It includes features such as versioning and namespaces with the aim of fixing some of the shortcomings in the existing JAR format, especially the JAR Hell, which can lead to issues such as classpath and class loading problems. The Java Module System was initially being developed under the Java Community Process as JSR 277 and was scheduled to be released with Java 7. JSR 277 later was put on hold and Project Jigsaw〔(【引用サイトリンク】 title=Project Jigsaw )〕 was created to modularize the JDK. This JSR was superseded by JSR 376 (Java Platform Module System). Project Jigsaw was originally intended for Java 7 (2011) but was deferred to Java 8 (2014) as part of Plan B, and again deferred to a Java 9 release in 2016.〔(【引用サイトリンク】 title=JDK 9 )〕 == Architecture == The Java Module System implemented for Java 9 will include the following JEPs and JSR (Java Specification Request):〔 * JEP 200: The Modular JDK: Define a modular structure for the JDK * JEP 201: Modular Source Code: Reorganize the JDK source code into modules, enhance the build system to compile modules, and enforce module boundaries at build time * JEP 220: Modular Run-Time Images: Restructure the JDK and JRE run-time images to accommodate modules and to improve performance, security, and maintainability * JEP 260: Encapsulate Most Internal APIs * JEP 261: Module System: Implement the Java Platform Module System * JSR 376: Java Platform Module System 〔(【引用サイトリンク】 title=Java Platform Module System (JSR 376) )〕 Modules are a new way of grouping code and data. Contrary to Jar files, modules explicitly declare which modules they depend on, and what packages they export. For example the following module declaration declares that the module ''com.foo.bar'' depends on another ''com.foo.baz'' module, and exports the following packages: ''com.foo.bar.alpha'' and ''com.foo.bar.beta'':
Contrary to the Jar file format, the module manifest describes these dependencies, and the JDK is able to check them both at compile-time and runtime. The JDK itself will be modularized for Java 9. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Java Module System」の詳細全文を読む スポンサード リンク
|